/*-
 * Copyright (c) 2007 Microsoft
 * All rights reserved.
 */

#pragma once

namespace Microsoft{
    namespace ComputeCluster{
        namespace MpiNet{

            ///<summay>
            ///Exception when a MPI error occurs
            ///</summay>
            [System::Serializable]
            public ref class MPIException : System::Exception
            {
            private:
                int code;

            public:
                MPIException()
                {
                }

                virtual System::String^ ToString() override ;

                property virtual System::String^ Message
                {
                    System::String^ get() override;
                };

                property virtual int ErrorCode
                {
                    int get();
                };

            internal:
                MPIException(int retcode);
            };
        }
    }
}